#region using

using NHibernate;

using RealEstate.Application;
using RealEstate.Application.Image;

using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;

#endregion

namespace RealEstate.Website
{
	public partial class Image : System.Web.UI.Page
	{

		#region Page_Load

		protected void Page_Load(object sender, EventArgs e)
		{

		}

		#endregion

		#region Event Handlers

		protected void btnSubmit_Click(object sender, EventArgs e)
		{

			ImageEntity entity = new ImageEntity();
			//entity.ImageID = System.Guid
			entity.ByteArray = fileUpload.FileBytes;
			entity.Filename = fileUpload.FileName;
			entity.Filesize = fileUpload.PostedFile.ContentLength;
			entity.MimeType = fileUpload.PostedFile.ContentType;

			ImageManager mgr = new ImageManager();
			mgr.Create(entity);

		}

		#endregion

	}
}
